* Info from Samuels and Shugart 2010, p.32-33
gen pres = .

replace pres = 1 if country_name == "Albania" & year >= 1997 & year <= 2007
replace pres = 1 if country_name == "Australia" & year >= 1946 & year <= 2007
replace pres = 1 if country_name == " Bangladesh" & year >= 1991 & year <= 2007
replace pres = 1 if country_name == "Belgium" & year >= 1946 & year <= 2007
replace pres = 1 if country_name == " Botswana" & year >= 1966 & year <= 2007
replace pres = 1 if country_name == "Canada" & year >= 1946 & year <= 2007
replace pres = 1 if country_name == "Czech Republic" & year >= 1993 & year <= 2007
replace pres = 1 if country_name == " Denmark" & year >= 1946 & year <= 2007
replace pres = 1 if country_name == "Estonia" & year >= 1991 & year <= 2007
replace pres = 1 if country_name == "France" & year >= 1946 & year <= 1962
replace pres = 1 if country_name == "Gambia" & year >= 1966 & year <= 1982
replace pres = 1 if country_name == "Germany" & year >= 1949 & year <= 2007
replace pres = 1 if country_name == "Greece" & year >= 1975 & year <= 2007
replace pres = 1 if country_name == "Hungary" & year >= 1990 & year <= 2007
replace pres = 1 if country_name == "India" & year >= 1950 & year <= 2007
replace pres = 1 if country_name == "Israel" & year >= 1948 & year <= 1996
replace pres = 1 if country_name == "Israel" & year >= 2001 & year <= 2007
replace pres = 1 if country_name == "Italy" & year >= 1948 & year <= 2007
replace pres = 1 if country_name == "Jamaica" & year >= 1959 & year <= 2007
replace pres = 1 if country_name == "Japan" & year >= 1952 & year <= 2007
replace pres = 1 if country_name == "Latvia" & year >= 1991 & year <= 2007
replace pres = 1 if country_name == "Malaysia" & year >= 1957 & year <= 1969
replace pres = 1 if country_name == "Mauritius" & year >= 1968 & year <= 2007
replace pres = 1 if country_name == "Moldova" & year >= 2001 & year <= 2007
replace pres = 1 if country_name == "Nepal" & year >= 1990 & year <= 2002
replace pres = 1 if country_name == "Netherlands" & year >= 1945 & year <= 2007
replace pres = 1 if country_name == "New Zeland" & year >= 1945 & year <= 2007
replace pres = 1 if country_name == "Norway" & year >= 1945 & year <= 2007
replace pres = 1 if country_name == "Pakistan" & year >= 1988 & year <= 1999
replace pres = 1 if country_name == "Papua New Guinea" & year >= 1975 & year <= 2007
replace pres = 1 if country_name == "Slovakia" & year >= 1993 & year <= 1998
replace pres = 1 if country_name == "Solomon Islands" & year >= 1978 & year <= 2000
replace pres = 1 if country_name == "Somalia" & year >= 1960 & year <= 1969
replace pres = 1 if country_name == "South Africa" & year >= 1990 & year <= 2007
replace pres = 1 if country_name == "Spain" & year >= 1978 & year <= 2007
replace pres = 1 if country_name == "Sri Lanka" & year >= 1948 & year <= 1978
replace pres = 1 if country_name == "Sweden" & year >= 1945 & year <= 2007
replace pres = 1 if country_name == "Thailand" & year >= 1992 & year <= 2006
replace pres = 1 if country_name == "Trinidad and Tobago" & year >= 1962 & year <= 2007
replace pres = 1 if country_name == "Turkey" & year >= 1983 & year <= 2007
replace pres = 1 if country_name == "United Kingdom" & year >= 1946 & year <= 2007

replace pres = 2 if country_name == "Armenia" & year >= 2005 & year <= 2007
replace pres = 2 if country_name == "Bulgaria" & year >= 1990 & year <= 2007
replace pres = 2 if country_name == "Croatia" & year >= 2000 & year <= 2007
replace pres = 2 if country_name == "Finland" & year >= 1945 & year <= 2007
replace pres = 2 if country_name == "France" & year >= 1962 & year <= 2007
replace pres = 2 if country_name == "Ireland" & year >= 1952 & year <= 2007
replace pres = 2 if country_name == "Lithauania" & year >= 1991 & year <= 2007
replace pres = 2 if country_name == "Macedonia" & year >= 1991 & year <= 2007
replace pres = 2 if country_name == "Madagascar" & year >= 1991 & year <= 1993
replace pres = 2 if country_name == "Mali" & year >= 1992 & year <= 2007
replace pres = 2 if country_name == "Moldova" & year >= 1991 & year <= 2001
replace pres = 2 if country_name == "Mongolia" & year >= 1992 & year <= 2007
replace pres = 2 if country_name == "Poland" & year >= 1989 & year <= 2007
replace pres = 2 if country_name == "Portugal" & year >= 1980 & year <= 2007
replace pres = 2 if country_name == "Romania" & year >= 1990 & year <= 2007
replace pres = 2 if country_name == "Slovak Republic" & year >= 1998 & year <= 2007
replace pres = 2 if country_name == "Slovenia" & year >= 1991 & year <= 2007
replace pres = 2 if country_name == "Ukraine" & year >= 2005 & year <= 2007

replace pres = 3 if country_name == "Armenia" & year >= 1998 & year <= 2005
replace pres = 3 if country_name == "Austria" & year >= 1946 & year <= 2007
replace pres = 3 if country_name == "Georgia" & year >= 2004 & year <= 2007
replace pres = 3 if country_name == "Madagascar" & year >= 1993 & year <= 1997
replace pres = 3 if country_name == "Mozambique" & year >= 1994 & year <= 2007
replace pres = 3 if country_name == "Namibia" & year >= 1990 & year <= 2007
replace pres = 3 if country_name == "Peru" & year >= 1980 & year <= 1992

replace pres = 3 if country_name == "Peru" & year >= 2000 & year <= 2007
replace pres = 3 if country_name == "Portugal" & year >= 1978 & year <= 1980
replace pres = 3 if country_name == "Russia" & year >= 1992 & year <= 2007
replace pres = 3 if country_name == "Senegal" & year >= 2000 & year <= 2007
replace pres = 3 if country_name == "Sri Lanka" & year >= 1978 & year <= 2007
replace pres = 3 if country_name == "Taiwan" & year >= 1997 & year <= 2007
replace pres = 3 if country_name == "Ukraine" & year >= 1992 & year <= 2005

replace pres = 4 if country_name == "Argentina" & year >= 1983 & year <= 2007
replace pres = 4 if country_name == "Benin" & year >= 1991 & year <= 2007
replace pres = 4 if country_name == "Bolivia" & year >= 1982 & year <= 2007
replace pres = 4 if country_name == "Brazil" & year >= 1946 & year <= 1964
replace pres = 4 if country_name == "Brazil" & year >= 1985 & year <= 2007
replace pres = 4 if country_name == "Chile" & year >= 1955 & year <= 1973
replace pres = 4 if country_name == "Chile" & year >= 1989 & year <= 2007
replace pres = 4 if country_name == "Colombia" & year >= 1957 & year <= 2007
replace pres = 4 if country_name == "Costa Rica" & year >= 1949 & year <= 2007
replace pres = 4 if country_name == "Cyprus" & year >= 1975 & year <= 2007
replace pres = 4 if country_name == "Dominican Republic" & year >= 1978 & year <= 2007
replace pres = 4 if country_name == "Ecuador" & year >= 1979 & year <= 2007
replace pres = 4 if country_name == "El Salvador" & year >= 1984 & year <= 2007
replace pres = 4 if country_name == "Gambia" & year >= 1982 & year <= 1993
replace pres = 4 if country_name == "Georgia" & year >= 1995 & year <= 2004
replace pres = 4 if country_name == "Ghana" & year >= 2001 & year <= 2007
replace pres = 4 if country_name == "Guatemala" & year >= 1996 & year <= 2007
replace pres = 4 if country_name == "Honduras" & year >= 1982 & year <= 2007
replace pres = 4 if country_name == "Indonesia" & year >= 2002 & year <= 2007
replace pres = 4 if country_name == "Korea, South" & year >= 1988 & year <= 2007
replace pres = 4 if country_name == "Madagascar" & year >= 1997 & year <= 2007
replace pres = 4 if country_name == "Malawi" & year >= 1994 & year <= 2007
replace pres = 4 if country_name == "Mexico" & year >= 1997 & year <= 2007
replace pres = 4 if country_name == "Nicaragua" & year >= 1990 & year <= 2007
replace pres = 4 if country_name == "Panama" & year >= 1989 & year <= 2007
replace pres = 4 if country_name == "Paraguay" & year >= 1992 & year <= 2007
replace pres = 4 if country_name == "Philippines" & year >= 1950 & year <= 1969
replace pres = 4 if country_name == "Philippines" & year >= 1987 & year <= 2007
replace pres = 4 if country_name == "Taiwan" & year >= 1992 & year <= 1997
replace pres = 4 if country_name == "United States" & year >= 1946 & year <= 2007
replace pres = 4 if country_name == "Uruguay" & year >= 1952 & year <= 1971
replace pres = 4 if country_name == "Uruguay" & year >= 1985 & year <= 2007
replace pres = 4 if country_name == "Venezuela" & year >= 1958 & year <= 2007
replace pres = 4 if country_name == "Zambia" & year >= 1991 & year <= 2007

label variable pres "Government type"
label define lab 1 "Parliamentary" 2 "Premier-Presidential" 3 "President-Parliamentary" 4 "Presidential"  , modify
label values pres lab

gen pres2 = pres
replace pres2 = 0 if pres < 3 & pres != .
replace pres2 = 1 if pres > 2 & pres != .
label variable pres2 "Presidential"
label define lab2 1 "Presidential" 0 "Parliamentary"
label values pres2 lab2
